﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Project.Database.Repository
{
    public partial class DatabaseRepository
    {

        private databaseEntities entities = new databaseEntities();

        #region ErrorMessages

        private const string MissingRole = "Role does not exist";
        private const string MissingUser = "User does not exist";
        private const string TooManyUser = "User already exists";
        private const string TooManyRole = "Role already exists";
        private const string AssignedRole = "Cannot delete a role with assigned users";
        private const string BlogAlreadyExists = "Cannot add blog that has same URL as another blog you own";

        #endregion

        #region Constructors

        public DatabaseRepository()
        {
            this.entities = new databaseEntities();
        }
 
        #endregion
 
        #region Persistence
 
        public void Save()
        {
            entities.SaveChanges();
        }
 
        #endregion
 
    }
}